<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <title>print_demo_01</title>
	<style>
		@page {
			margin-top: 0;
			margin-bottom: 0;
			margin-left: 0;
			margin-right: 0;
		}
		@media print{
			body {
				background: #fff;
				margin-top: 0;
				margin-bottom: 0;
				margin-left: 0;
				margin-right: 0;
			}
			.notShow {
				display: none;
			}
		}
	</style>
	<script type="text/javascript" src="../third-party/jquery-1.10.2.min.js"></script>
</head>
<body>

<input class="notShow" type="button" id="printBtn" value="打印"/>
<hr class="notShow">
<table style="border:1px solid red;margin:0;padding:0;"> <!-- page-break-after:always; -->
	<tr height="1117px"> <!-- tr加上border样式,没有效果 --> <!-- 将高度减4, (1122-4=1118) --> <!-- 将高度减5, (1122-5=1117) -->
		<td width="56px" style="border:1px solid blue;margin:0;padding:0;"></td>
		<td width="730px" style="border:1px solid green;margin:0;padding:0;"></td><!-- 将宽度减4, (736-4=732) -->
	</tr>
</table>
<hr class="notShow">
<table style="border:1px solid red;margin:0;padding:0;">
	<tr height="1117px" style="border:1px solid black;"> <!-- tr加上border样式,没有效果 -->
		<td width="56px" style="border:1px solid blue;margin:0;padding:0;"></td>
		<td width="730px" style="border:1px solid green;margin:0;padding:0;"></td>
	</tr>
</table>
<hr class="notShow">
<table>
	<tr height="1117px" style="border:1px solid black;"> <!-- tr加上border样式,没有效果 -->
		<td width="56px" style="border:1px solid blue;margin:0;padding:0;"></td>
		<td width="730px" style="border:1px solid green;margin:0;padding:0;"></td>
	</tr>
</table>
<hr class="notShow">

<!--
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><title>wxg</title><style>@page {margin-top: 0;margin-bottom: 0;margin-left: 0;margin-right: 0;}@media print{body {background: #fff;margin-top: 0;margin-bottom: 0;margin-left: 0;margin-right: 0;}}</style></head><body>
</body></html>
-->

<!--
<table style="border:1px solid red;margin:0;padding:0;">
<tr height="1117px">
<td width="56px" style="border:1px solid blue;margin:0;padding:0;"></td>
<td width="730px" style="border:1px solid green;margin:0;padding:0;"></td>
</tr>
</table>
-->

<!--
<table style="border:1px solid red;margin:0;padding:0;"><tr height="1117px"><td width="56px" style="border:1px solid blue;margin:0;padding:0;"></td><td width="730px" style="border:1px solid green;margin:0;padding:0;"></td></tr></table>
-->

<script type="text/javascript">
	$(function(){
		$('#printBtn').on('click', function(){
			var $ifr_00 = $('#ifr_00');
			if($ifr_00[0]){
				$ifr_00.remove();
			}
			var tplIfr = '<iframe id="ifr_00" style="width:0;height:0;"></iframe>';
			$('body').append( tplIfr );
			setTimeout(function(){
				$ifr_00 = $('#ifr_00');
				if($ifr_00[0]){
					var _ifr = $ifr_00[0];
					var _doc = _ifr.contentWindow.document;
					_doc.open();
					_doc.write('<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><title>wxg</title><style>@page {margin-top: 0;margin-bottom: 0;margin-left: 0;margin-right: 0;}@media print{body {background: #fff;margin-top: 0;margin-bottom: 0;margin-left: 0;margin-right: 0;}}</style></head><body>');
					_doc.write('<table style="border:1px solid red;margin:0;padding:0;"><tr height="1114px"><td width="56px" style="border:1px solid blue;margin:0;padding:0;"></td><td width="724px" style="border:1px solid green;margin:0;padding:0;"></td></tr></table>');
					_doc.write( '<script type="text\/javascript">window.onload=function(){window.print();};<\/script>' );
					_doc.write('</body></html>');
					_doc.close();
				}
			}, 0);
		});
	});
</script>

</body>
</html>